package com.future.hedongjun.home.bean.response;

import com.future.baselib.entity.BaseResponse;
import com.future.hedongjun.home.bean.DanMuBean;
import com.future.hedongjun.home.bean.TopicBean;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

/**
 * @author jniu
 * @Email niuxiaoqi@hztianque.com
 * @time 2018/12/26
 */
public class DanmuResponse extends BaseResponse {

    public List<DanMuBean> data;

    @Override
    public void parseInfo(String content) throws JSONException {
        data = new ArrayList<>();
        JSONArray arr = new JSONArray(content);
        for (int i = 0; i < arr.length(); i++) {
            JSONObject object = arr.optJSONObject(i);
            DanMuBean bean = new DanMuBean();
            bean.teacher_id = object.optString("teacher_id");
            bean.user_cotent = object.optString("user_cotent");
            data.add(bean);
        }
    }
}
